<div id="nav" class="mainnav_title">
	<ul>
		<a class="on" href="{:U('lists')}">图片广告</a> |
		<a href="{:U('add')}">添加</a>
	</ul>
</div>

<form name="myform" id="myform" action="" method="post">
	<div class="table-list">
		<table cellspacing="0" cellpadding="0" width="100%">
			<thead>
				<tr>
					<th><a href="javascript:void(0);" onclick="sel_all()">全选</a></th>
					<th>标题</th>
					<th>图片</th>
					<th>显示顺序</th>
					<th>起始时间</th>
					<th>结束时间</th>
					<th>展示区域</th>
					<th>归属地区</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<volist name="lists" id="vo">
				<tr>
					<td><input type="checkbox" class="sel" id="sel_{$vo.id}"
						value="{$vo.id}" name="items_{$vo.id}" /></td>
					<td>{$vo.title}</td>

					<td><img src="{$vo.path}"
						style="max-height: 50px; max-width: 120px;" /></td>
					<td>{$vo.f_sort}</td>
					<td>{$vo.start_time|f_date}</td>
					<td>{$vo.end_time|f_date}</td>
					<td>{$vo.area}</td>
					<td><if condition="$vo.areaid eq '0471'"> 呼和浩特 </if> 
					<if
							condition="$vo.areaid eq '0470'"> 呼伦贝尔 </if>
							 <if
							condition="$vo.areaid eq '0479'"> 锡林郭勒盟 </if>
                       <if
							condition="$vo.areaid eq '0483'"> 额济纳 </if></td>
					<td><a href="{:U('edit',array('id'=>$vo['aid']))}">编辑</a>&nbsp;<a
						href="{:U('del',array('id'=>$vo['aid']))}"
						onclick="return atr_confirm(this.href,'确认删除吗')">删除</a></td>

				</tr>
				</volist>
			</tbody>
		</table>
	</div>
	<div class="btn">
		<input type="button" class="button" name="dosubmit" value="删除"
			onclick="myform.action='{:U('deleteall')}';return confirm_deleteall()" />
		<input type="button" class="button" name="dosubmit" value="排序"
			onclick="myform.action='{:U('sort_list')}';$('#myform').submit();" />
		{$page}
	</div>
</form>
<script type="text/javascript">
function sel_all(){
    $('input.sel').each(function(index){
        if($(this).attr('checked')){
            $(this).removeAttr('checked');
        }else{
            $(this).attr('checked', 'checked');
        }
    });
}

</script>


